package com.ffcs.web.utils;

import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;

/**
 * @Title: IntrospectorUtil.java 
 * @Package com.ffcs.cbox.utils 
 * @Description: Java内省工具类
 * @Copyright: Copyright (c) 2010 FFCS All Rights Reserved
 * @author Yujl
 * @date 2013-12-13 上午08:51:19 
 * @version V1.00.00 
 */
public class IntrospectorUtil {
	/**
	 * @Title: getProperty 
	 * @Description: 获取特定的属性Object
	 * @param :@param className
	 * @param :@param javaBean
	 * @param :@param proName
	 * @param :@return
	 * @param :@throws Exception
	 * @return Object    返回类型  
	 * @author Yujl
	 * @date 2013-12-13 上午08:55:03
	 */
	public static Object getProperty(Class className, Object javaBean,String proName) throws Exception {     
	       PropertyDescriptor proDescriptor = new PropertyDescriptor(proName, className);     
	       Method methodGetX = proDescriptor.getReadMethod();     
	       Object objx = methodGetX.invoke(javaBean);     
	       return objx;
	   }
}

